﻿
@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/CommonView.cshtml";
    List<One_day.Models.Table> list = ViewBag.lst;
}

<div>
    <a style="position:fixed;top:0px;margin:5px;text-align:center" href="~/Yichen/Index">
        <img src="~/Upload/back.png" style="width:40px;height:40px;" />
    </a>
    <div style="padding:20px;">
        @{
            foreach (One_day.Models.Table table in list)
            {
                //由于Id在Table表中是唯一的，所有可以用来锁定数据
                <a href="~/Yichen/Content?Id=@table.Id">
                    <div class="media">
                        <div class="media-left">
                            <img src="/upload/@table.PicUrl" style="width:50px;height:50px;" />
                        </div>
                        <div class="media-body">
                            <h4 class="media-heading">@table.ProductName</h4>
                            <div>@table.Price 元</div>
                        </div>
                    </div>
                </a>
            }
        }
    </div>
</div>


